package com.ruoyi.controller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.dto.PartitionAddDTO;
import com.ruoyi.dto.PartitionDTO;
import com.ruoyi.dto.UPSAddDTO;
import com.ruoyi.dto.UPSDTO;
import com.ruoyi.service.PartitionService;
import com.ruoyi.service.UPSService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

/**
 * UPS分区表
 * @Author:zzm
 * @Date: 2024/3/04 11:08
 */
@RestController
@RequestMapping("/amac/ups")
public class UPSController extends BaseController {

    @Autowired
    private UPSService upsService;

    /**
     * 查询
     * @param dto
     * @return
     */
    @GetMapping("/getList")
    public TableDataInfo getList(UPSDTO dto){
        startPage();
        return getDataTable(upsService.getList(dto));
    }

//    @PostMapping("/add")
//    public AjaxResult add(@RequestBody @Valid UPSAddDTO dto){
//        return AjaxResult.success(partitionService.add(dto));
//    }
}
